﻿using System;
using System.Reflection;

namespace Hopscotch.Presentation.Common.Utils
{
	public static class ResourceHelper
	{
		public static Uri GetIconUri(Assembly assembly, string filename)
		{
			string assemblyName = assembly.ToString().Split(',')[0];
			string uriString = String.Format("pack://application:,,,/{0};component/{1}",
				assemblyName, filename);
			return new Uri(uriString);
		}
	}
}
